﻿using Abp.AutoMapper;
using FwProject.ShoppingMall.Config;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace FwProject.Com.Dto
{
    [AutoMapTo(typeof(Region))]
    public class RegionEnterDto
    {
        [Display(Name="上级地区")]
        [MaxLength(Region.MaxIdLength, ErrorMessage = "不能超过{1}个字符")]
        public string ParentId { get; set; }

        [Display(Name="名称")]
        [Required(ErrorMessage ="{0}不能为空")]
        [MaxLength(Region.MaxNameLength,ErrorMessage ="不能超过{1}个字符")]
        public string Name { get; set; }
        
        [Display(Name = "电话区号")]
        [MaxLength(Region.MaxCodeLength, ErrorMessage = "不能超过{1}个字符")]
        public string Code { get; set; }

        [Display(Name = "邮编")]
        [MaxLength(Region.MaxZipLength, ErrorMessage = "不能超过{1}个字符")]
        public string Zip { get; set; }

        [Display(Name = "等级")]
        public int Level { get; set; } = 1;

        [Display(Name = "排序")]
        public int Orderlist { get; set; } = 1;
    }
}
